cmake_minimum_required(VERSION 3.0)

project(iourpg_arena)

find_package(Threads)

SET ( SRC_ARENA
	arena.cpp
	main.cpp
	datatable.cpp
	dbmemory.cpp
	dblmdb.cpp
	dbsqlite.cpp
	logger.cpp
	player.cpp
	shipai.cpp
	shipdrone.cpp
	shippart.cpp
	shipplayer.cpp
	trophy.cpp
# build own version of sqlite3
	sqlite/sqlite3.c
)

add_executable(iourpg_arena ${SRC_ARENA} )
target_link_libraries(iourpg_arena PRIVATE Threads::Threads lmdb)

# sqlite3 options, see https://www.sqlite.org/compile.html
target_compile_definitions(iourpg_arena PRIVATE -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_TEMP_STORE=2 -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_SHARED_CACHE)

# prof
# profiling for debug release
target_compile_options(iourpg_arena PUBLIC -pg)
target_link_options(iourpg_arena PUBLIC -pg)
